import { watch } from "vue"

export const useWatch = (val) => {
  watch(() => val.value, (newValue, oldValue) => {
    if (newValue.length > 20) {
      alert('事项名称不能超过20字符')
    }
  })

  // watch(() => newNote, (newValue, oldValue) => {
  //   if (newValue.length > 200) {
  //     alert('输入的字符不能超过200字')
  //   }
  // })
}